package cn.com.guage.dtm.check.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import cn.com.guage.dtm.check.domain.Blog;
import cn.com.guage.dtm.check.domain.User;
import cn.com.guage.dtm.check.service.IBlogService;
import cn.com.guage.dtm.check.service.IUserService;
import cn.com.guage.dtm.common.core.controller.BaseController;

/**
 * 代码生成 操作处理
 * 
 * 
 */
@Controller
@RequestMapping("/check")
public class TestController extends BaseController
{

    @Autowired
    private IUserService userService;
    @Autowired
    private IBlogService blogService;

    @GetMapping("/getDb1")
    @ResponseBody
    public User getDb1()
    {
    	return userService.selectUserById(1);
    }
    @GetMapping("/getDb2")
    @ResponseBody
    public Blog getDb2()
    {
    	return blogService.selectBlogById(1L);
    }
}